package ren.kane.phoenix.design.observer;

/**
 * @author renrk(1275) on 2018-11-07 6:39 PM
 **/
public class HexObserver extends Observer {

    public HexObserver(Subject subject) {
        this.subject = subject;
        this.subject.attach(this);
    }

    @Override
    public void update() {
        System.out.println("Hex String: " + Integer.toHexString(subject.getState()).toUpperCase());
    }
}
